from redis import Redis
r =Redis()
r.set('k','1')
v = r.get('k')
print(v)
r.hset('h1','name',"hello",{"title":"我的书",'author':"胡小婷"})
v=r.hgetall('h1')
result_str = {x.decode('utf-8'):y.decode('utf-8') for x,y in v.items()}
print(result_str)